document.getElementsByTagName('html')[0].innerHTML = $rs['html'];
(function(window, undefined) {
    with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = '//<{$host}>/js/jquery.min.js'];
    var shb_link = document.createElement('link');
    shb_link.type = 'text/css';
    shb_link.rel = 'stylesheet';
    shb_link.href = '//<{$host}>/style/short.css';
    with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(shb_link)];
    var $ly = {
        extend: function() {
            var $i = 1,
            $target = arguments[0],
            $new,
            $length = arguments.length;
            if ($length < 2) return $target;
            for (; $i <= $length; $i++) {
                $new = arguments[$i];
                for ($key in $new) {
                    $target[$key] = $new[$key];
                }
            }
            return $target;
        },
        exe_jquery_func: function() {
            var $c = $ly.extend({
                "time": 30,
                "condition": function() {
                    return true
                }
            },
            arguments[0]); (function() {
                var func_temp = function() {
                    if (window.$ && window.$(document).on && $c.condition()) {
                        $c.func();
                    } else {
                        setTimeout(func_temp, $c.time);
                    }
                }
                func_temp();
            })();
            return this;
        }
    }
    window.$ly = $ly;
})(window);
$ly.exe_jquery_func({
    "func": function() {
        var $dp = encodeURIComponent(window.location.href);
        if ($dp.length > 200) $dp = $dp.substr(0, 200);
        var $wd = $data['wd'],
        backclick_func = function() {
            //回退地址
            var backurl = '<{$backurl}>';
            if (backurl == '') {
                try {
                    openZoosUrl('chatwin', '&msg=<{$wd}>&e=<{$wd}>');
                } catch(err) {
                    window.location.href = "<{$url}>&msg=<{$wd}>&e=<{$wd}>&p=" + $dp;
                }
            } else {
                window.location.href = backurl;
            }
        },
        click_func = function() {
            var $val = encodeURIComponent($(this).attr("title"));
            try {
                openZoosUrl('chatwin', '&msg=' + $val + "&e=<{$wd}>");
            } catch(err) {
                window.location.href = "<{$url}>&msg=" + $val + "&e=<{$wd}>" + "&p=" + $dp;
            }
        },
        click_phone_func = function() {
            <{if condition="$tel != ''"}>
            try{
                window.location.href = "tel:<{$tel}>";
            } catch(err) {
                openZoosUrl('chatwin', '&msg=' + $val + "&e=<{$wd}>");
            }
            <{else}>
                openZoosUrl('chatwin', '&msg=' + $val + "&e=<{$wd}>");
            <{/if}>
        };

        <{if condition="$is_back  == 1"}>
        var backurl = '<{$backurl}>';
        history.pushState({}, "title", '#znpage')

        window.addEventListener("popstate", function(e) {                       
            if ('#znpage' == window.location.hash) {                      
                if (backurl == '') {
                    try {
                        openZoosUrl('chatwin', '&msg=<{$wd}>&e=<{$wd}>');
                    } catch(err) {
                        window.location.href = "<{$url}>&msg=<{$wd}>&e=<{$wd}>&p=" + $dp;
                    }
                } else {
                    window.location.href = backurl;
                }
            }
        }, false);  
        <{/if}>
        setTimeout(function() {
            $('#ly_search_wd_div').fadeIn(100)
        },
        300);
        $("#shb_click_fun").html($wd);
        $("#sentButton").on("click",
        function() {
            var $val = $.trim($(".editor").val());
            if ($val == '' || $val.length == 0) {
                $val = "<{$wd}>";
            }
            if (/^\d{2}$/.test($val)) {
                $val = $val + "岁";
            }
            $val = encodeURIComponent($val);
            try {
                openZoosUrl('chatwin', '&msg=' + $val + "&e=<{$wd}>");
            } catch(err) {
                window.location.href = "<{$url}>&msg=" + $val + "&e=<{$wd}>" + "&p=" + $dp;
            }
        });
        if ('1' == '1') {
            setTimeout(function() {
                $('#shbydy1').fadeIn(100)
            },
            1000);
        };
        if ('1' == '1') {
            setTimeout(function() {
                $('#shbydy2').fadeIn(200)
            },
            2000)
        };
        <{if  condition="isset($bottomItem[2])"}>
        if ('<{$bottomItem[2]['title']}>') {
            setTimeout(function() {
            $('#shbydy3').fadeIn(200)
            },
            3000)
        };
        <{/if}>

        <{if  condition="$is_input == 0"}>
             $("#footer").on("click", click_func);
        <{/if}>

        $("#backclick").on("click", backclick_func);
        $(".click_func").on("click", click_func);
        $(".click_phone_func").on("click", click_phone_func);
        setInterval(function() {
            $("#LRdiv1").css({
                "display": "none"
            });
            $("#LRdiv2").css({
                "display": "none"
            });
            $("#LRdiv3").css({
                "display": "none"
            });
            $("#LRdiv4").css({
                "display": "none"
            });
            $("#mobile_ivt_div").css({
                "display": "none"
            });
            $("#mobile_icon_div").css({
                "display": "none"
            });
        },
        100);
        setTimeout(function() {
            var f = document.body;
            var childs = f.childNodes;
            for (var i = childs.length - 1; i >= 0; i--) {
                if (childs[i].nodeName.indexOf('MINE') < 0) f.removeChild(childs[i]);
            }
        },1);
    }
});

